package com.ai.controller.made;


import com.ai.annotation.EnterPathParamLog;
import com.ai.common.CommonResponse;
import com.ai.entity.made.BaseIdOrNameBO;
import com.ai.service.made.RegionsConfigService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Mr.Chen
 * @since 2020-08-20
 */
@RestController
@RequestMapping("/regionsConfig")
@Slf4j
public class RegionsConfigController {


    @Autowired
    RegionsConfigService regionsConfigService;

    /**
     * 通过功能type全查询
     */
    @ApiOperation("根据功能ID获取功能列表")
    @PostMapping("selectByFunction")
    @EnterPathParamLog
    public CommonResponse selectByFunction(@RequestBody BaseIdOrNameBO baseIdOrNameBO){
        CommonResponse resultData = regionsConfigService.selectByFunction(baseIdOrNameBO);
        log.info(resultData.toString());
        return resultData;
    }
}

